exports.search_appointment_record = function(req,res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};
    var skip    = restfulParams.skip  == undefined ? 0 : restfulParams.skip;
    var limit   = restfulParams.limit == undefined ? config.publicConfig.LIMIT : restfulParams.limit;
    var ar_id = restfulParams.ar_id == undefined ? "" : "/ar_id/" + restfulParams.ar_id;
    //任务流创建
    async.waterfall([

        //获取助力活动参赛者列表
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.search_appointment_record +"/ar_oid/" + restfulParams.ar_oid + ar_id + "/skip/" + skip + "/limit/" + limit + "/sort_order/ar_create_time-desc",
                    method : 'POST',
                    data   : {
                        fields : [
                            "ar_id",
                            "ar_name",
                            "ar_phone",
                            "ar_des",
                            "ar_create_time",
                            "ar_deal_result",
                            "ar_deal_time",
                            "ar_deal_result_dec"
                        ].join(",")
                    }
                },
                function (err, data) {
                    console.log(data);
                    if(err){
                        console.log(data);
                    }
                    resultData.appointRecordList = data.data;

                    cb();
                }
            );
        },


    ],function(err, result){

        //返回最终拼接结果
        RES.response(res,true,resultData);

    });

}


























